package ${basePackege}.${module}.entity;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import tk.mybatis.mapper.annotation.KeySql;
import com.gzkit.baseframework.core.utils.UUIdGenId;

@Table(name = "${TableName}")
public class ${entity?cap_first} {
	<#list column as field>
    /**
    * comment  ${(field.comment)!}
    */
    <#if field.isPK == "true">
    @Id
	</#if>
	<#if field.isPK == "true" && keyStrategy == 0>
	@KeySql(useGeneratedKeys = true)
	</#if>
	<#if field.isPK == "true" && keyStrategy == 1 && sequenceName??>
	@KeySql(sql = "select ${sequenceName}.nextval from dual",order = ORDER.BEFORE)
	</#if>
	<#if field.isPK == "true" && keyStrategy == 2>
	@KeySql(genId = UUIdGenId.class)
	</#if>
	@Column(name = "${field.columnName}")
	private ${field.javaType}  ${field.javaColumName};
    </#list>

	<#list column as field2>

    public ${field2.javaType} get${field2.javaColumName?cap_first}() {
        return ${field2.javaColumName};
    }

    public void set${field2.javaColumName?cap_first}(${field2.javaType} ${field2.javaColumName}) {
        this.${field2.javaColumName} = ${field2.javaColumName};
    }
    </#list>
}